import type { AllConsentNames } from '../types';

/**
 * Default tracking domains that require specific consent types
 */
const DEFAULT_DOMAIN_CONSENT_MAP: Record<string, AllConsentNames> = {
	// Analytics/Measurement domains
	'www.google-analytics.com': 'measurement',
	'analytics.google.com': 'measurement',
	'www.googletagmanager.com': 'measurement',
	'stats.g.doubleclick.net': 'measurement',
	'ampcid.google.com': 'measurement',
	'analytics.twitter.com': 'measurement',
	'analytics.pinterest.com': 'measurement',
	'dc.services.visualstudio.com': 'measurement',
	'www.clarity.ms': 'measurement',
	'www.hotjar.com': 'measurement',
	'static.hotjar.com': 'measurement',
	'script.hotjar.com': 'measurement',
	'insights.hotjar.com': 'measurement',
	'mouseflow.com': 'measurement',
	'api.mouseflow.com': 'measurement',
	'tools.mouseflow.com': 'measurement',
	'cdn.heapanalytics.com': 'measurement',
	'plausible.io': 'measurement',
	'matomo.cloud': 'measurement',
	'matomo.org': 'measurement',
	'mixpanel.com': 'measurement',
	'api.mixpanel.com': 'measurement',
	'sentry.io': 'measurement',
	'browser.sentry-cdn.com': 'measurement',
	'js.monitor.azure.com': 'measurement',
	'stats.wp.com': 'measurement',
	'pixel.wp.com': 'measurement',
	'analytics.amplitude.com': 'measurement',
	'api2.amplitude.com': 'measurement',
	'cdn.amplitude.com': 'measurement',
	'api.segment.io': 'measurement',
	'cdn.segment.com': 'measurement',
	'api.segment.com': 'measurement',
	'pendo.io': 'measurement',
	'data.pendo.io': 'measurement',
	'cdn.pendo.io': 'measurement',

	// Marketing/Advertising domains
	'connect.facebook.net': 'marketing',
	'platform.twitter.com': 'marketing',
	'platform.linkedin.com': 'marketing',
	'www.googleadservices.com': 'marketing',
	'doubleclick.net': 'marketing',
	'googleads.g.doubleclick.net': 'marketing',
	'ad.doubleclick.net': 'marketing',
	'www.facebook.com': 'marketing',
	'ads.linkedin.com': 'marketing',
	'ads-api.tiktok.com': 'marketing',
	'analytics.tiktok.com': 'marketing',
	'business.tiktok.com': 'marketing',
	'ads.pinterest.com': 'marketing',
	'log.pinterest.com': 'marketing',
	'ads-twitter.com': 'marketing',
	'static.ads-twitter.com': 'marketing',
	'advertising.twitter.com': 'marketing',
	'ads.yahoo.com': 'marketing',
	'sp.analytics.yahoo.com': 'marketing',
	'gemini.yahoo.com': 'marketing',
	'adroll.com': 'marketing',
	'a.adroll.com': 'marketing',
	'd.adroll.com': 'marketing',
	's.adroll.com': 'marketing',
	'adform.net': 'marketing',
	'track.adform.net': 'marketing',
	'dmp.adform.net': 'marketing',
	'criteo.com': 'marketing',
	'static.criteo.net': 'marketing',
	'bidder.criteo.com': 'marketing',
	'dynamic.criteo.com': 'marketing',
	'gum.criteo.com': 'marketing',
	'taboola.com': 'marketing',
	'cdn.taboola.com': 'marketing',
	'trc.taboola.com': 'marketing',
	'outbrain.com': 'marketing',
	'widgets.outbrain.com': 'marketing',
	'tr.outbrain.com': 'marketing',
	'amplify.outbrain.com': 'marketing',
	'bing.com': 'marketing',
	'bat.bing.com': 'marketing',
	'clarity.ms': 'marketing',
	'quantserve.com': 'marketing',
	'secure.quantserve.com': 'marketing',
	'pixel.quantserve.com': 'marketing',
	'exelator.com': 'marketing',
	'load.exelator.com': 'marketing',
	'api.exelator.com': 'marketing',
	'ad.360yield.com': 'marketing',
	'match.360yield.com': 'marketing',
	'ad.turn.com': 'marketing',
	'r.turn.com': 'marketing',
	'd.turn.com': 'marketing',

	// Functionality domains
	'cdn.jsdelivr.net': 'functionality',
	'ajax.googleapis.com': 'functionality',
	'fonts.googleapis.com': 'functionality',
	'maps.googleapis.com': 'functionality',
	'www.recaptcha.net': 'functionality',
	'recaptcha.net': 'functionality',
	'www.gstatic.com': 'functionality',
	'fonts.gstatic.com': 'functionality',
	'cdnjs.cloudflare.com': 'functionality',
	'unpkg.com': 'functionality',
	'code.jquery.com': 'functionality',
	'maxcdn.bootstrapcdn.com': 'functionality',
	'cdn.datatables.net': 'functionality',
	'js.stripe.com': 'functionality',
	'api.stripe.com': 'functionality',
	'checkout.stripe.com': 'functionality',
	'js.braintreegateway.com': 'functionality',
	'api.braintreegateway.com': 'functionality',
	'cdn.shopify.com': 'functionality',
	'js.intercomcdn.com': 'functionality',
	'widget.intercom.io': 'functionality',
	'cdn.auth0.com': 'functionality',
	'js.pusher.com': 'functionality',
	'sockjs.pusher.com': 'functionality',

	// Experience/UX domains
	'app.optimizely.com': 'experience',
	'cdn.optimizely.com': 'experience',
	'logx.optimizely.com': 'experience',
	'cdn.mouseflow.com': 'experience',
	'fullstory.com': 'experience',
	'rs.fullstory.com': 'experience',
	'edge.fullstory.com': 'experience',
	'vwo.com': 'experience',
	'dev.visualwebsiteoptimizer.com': 'experience',
	'assets.adobedtm.com': 'experience',
	'cdn.tt.omtrdc.net': 'experience',
	'demdex.net': 'experience',
	'sc.omtrdc.net': 'experience',
	'crazyegg.com': 'experience',
	'script.crazyegg.com': 'experience',
	'tracking.crazyegg.com': 'experience',
	'luckyorange.com': 'experience',
	'cdn.luckyorange.com': 'experience',
	'w1.luckyorange.com': 'experience',
	'upload.luckyorange.com': 'experience',
	'clicktale.net': 'experience',
	'cdn.clicktale.net': 'experience',
	'conductor.clicktale.net': 'experience',
	'userzoom.com': 'experience',
	'cdn.userzoom.com': 'experience',
	'api.userzoom.com': 'experience',
	'contentsquare.net': 'experience',
	't.contentsquare.net': 'experience',
	'app.contentsquare.com': 'experience',
};

export default DEFAULT_DOMAIN_CONSENT_MAP;
